var n = 1;

var climbStairs = function(n) {
    var sum = 0;
    if(n == 1) {
        sum = 1
    }else {
        sum = 2;
        for(var i = 2; i<=n; i++) {
            sum = sum+(i-2);
        }
    }
    return sum
}

console.log(climbStairs(n))